#pragma once
#include "MysqlDao.hpp"
#include "Singleton.hpp"
#include <string>
class MysqlMgr : public Singleton<MysqlMgr> {
  friend class Singleton<MysqlMgr>;

private:
  MysqlMgr();
  MysqlDao _dao;

public:
  ~MysqlMgr();
  int RegUser(const std::string &name, const std::string &email,
              const std::string &pwd);
  bool CheckEmail(const std::string &email);
  bool UpdatePwd(const std::string &email, const std::string &pwd);
  bool CheckPwd(const std::string &email, const std::string &pwd,
                UserInfo &userInfo);
};